package com.submit.demo.service;

import com.submit.demo.common.api.CommonPage;
import com.submit.demo.dto.SubmitterTaskData;
import com.submit.demo.dto.TaskInsertParam;
import com.submit.demo.model.Submitter;
import com.submit.demo.model.Task;
import org.springframework.web.multipart.MultipartFile;

import java.util.Date;

public interface TaskService {
    String createTask(TaskInsertParam param);

    Integer cancelTask(String tid);

    Integer upload(MultipartFile[] words, String tid);

    CommonPage<Task> selectTasksByCid(String cid, Integer currentPage, Integer pageSize);

    CommonPage<Task> selectTasksBySid(String cid, Integer currentPage, Integer pageSize);

    Integer startTask(String tid);

    Integer pauseTask(String tid);

    CommonPage<Task> getList(Integer currentPage, Integer pageSize, Integer status);

    Task getTask(String id);

    Integer changeTaskFileName(String tid, String title);

    Integer changeDate(String tid, Date date);

    SubmitterTaskData selectSubTaskByTid(String sid, String tid);

    CommonPage<Submitter> getListByTid(String tid, Integer currentPage, Integer pageSize);
}
